package naito_rescue.message;

import java.io.*;
import java.util.*;

import static naito_rescue.debug.DebugUtil.*;
import naito_rescue.message.*;
import naito_rescue.message.manager.*;
import naito_rescue.message.stream.*;
import naito_rescue.agent.*;

public abstract class NAITOMessage
{
	protected MessageType type = MessageType.NULL;
	protected boolean hasSent = false;
	
	public abstract RawDataOutputStream encode();
	public abstract void decode(RawDataInputStream in);
	
	public NAITOMessage(){
		this.hasSent = false;
	}
	public void markAsSent(){
		this.hasSent = true;
	}
	public boolean hasSent(){
		return this.hasSent;
	}
	public MessageType getType(){
		return type;
	}
	
}
